package com.example.d3.character.compare;

import android.app.Application;

public class D3CompareApp extends Application {
	private HeroData hero1 = new HeroData();
	private HeroData hero2 = new HeroData();

	public void onCreate() {
        super.onCreate();
	}
	
	/* Stores the hero data for the character selected
	 * Will store the hero in the next available slot
	 * and return the index of the slot used
	 */
    public int setHero(HeroData h)
    {
    	if(hero1.isValid()){
    		hero2 = h;
    		return 2;
    	} else {
    		hero1 = h;
    		return 1;
    	}
    }
    
    /* Store a new hero in the first slot
     * 
     */
    public void setHero1(HeroData h1){
    	hero1 = h1;
    }
    
    /* Store a new hero in the second slot
     * 
     */
    public void setHero2(HeroData h2){
    	hero2 = h2;
    }
    
    /* Get the hero in the first slot
     * 
     */
    public HeroData getHero1(){
    	return hero1;
    }
    
    /* Get the hero in the second slot
     * 
     */
    public HeroData getHero2(){
    	return hero2;
    }
}
